#ifndef RINGBUFFER_H_
#define RINGBUFFER_H_

typedef int RING_BUFFER_DATA;

struct ringBufferStr
{
    RING_BUFFER_DATA *buf;
    unsigned int len;
    unsigned int head;
    unsigned int tail;
};
typedef struct ringBufferStr ringBuffer;

void ringBuffer_Init(ringBuffer *ring, RING_BUFFER_DATA *buf, unsigned int len);
void ringBuffer_Push_Back(ringBuffer *ring, RING_BUFFER_DATA data);
RING_BUFFER_DATA ringBuffer_Get_Head(ringBuffer *ring);
RING_BUFFER_DATA ringBuffer_Pop_Head(ringBuffer *ring);
unsigned int ringBuffer_Size(ringBuffer *ring);
void ringBuffer_Clear(ringBuffer *ring);

#endif
